<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .main {
            width: 600px;
            height: 600px;
            border: 1px solid red;
            display: flex;
            align-items: center;
            /* flex-direction: column; */
        }
        .main > div {
            width: 100px;
            border: solid;
        }
        /* 
            align-self 项目设置自己在交叉轴上的对齐方式
            auto(默认) 容器继承父元素align-items属性，没有父元素则等同于stretch
            stretch 当交叉轴是Y轴时，项目没有设置高度或者高度是auto时，
                    项目的高度会变成交叉轴的高度
            flex-start 交叉轴开始（起点）位置
            flex-end 交叉轴结束（终点）位置
            center 交叉轴中间（中点）位置
            baseline 项目的第一行文字的基线对齐
        */
        .main > div:nth-child(1) {
            font-size: 2rem;
            height: 80px;
            align-self: flex-start;
        }
        .main > div:nth-child(2) {
            font-size: 3rem;
            height: 100px;
            align-self: flex-end;
        }
        .main > div:nth-child(3) {
            height: 120px;
            align-self: center;
        }
        .main > div:nth-child(4) {
            height: auto;
            align-self: baseline;
        }
        .main > div:nth-child(5) {
            align-self: auto;
        }
        .main > div:nth-child(6) {
            align-self: stretch;
        }
    </style>
</head>
<body>
    <div class="main">
        <div>flex1</div>
        <div>flex2</div>
        <div>flex3</div>
        <div>flex4</div>
        <div>flex5</div>
        <div>flex6</div>
    </div>
</body>
</html>